package com.qf.boot1.config;


import com.qf.boot1.entity.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
public class MyConfig {

    // 方法名就是bean的id,返回值就是生产的bean
    @Bean
    public User user() {
        User user = new User();
        user.setId(1);
        user.setName("张三");
        return user;
    }

}
